<!--
 * @Description: 显示与隐藏
 * @Author: rendc
 * @Date: 2022-09-21 11:24:05
 * @LastEditors: rendc
 * @LastEditTime: 2022-09-21 11:34:44
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>显示与隐藏</title>
  <style>
    #div2:hover {
      display: none;
      display: inline-block;
      display: inline;
      display: block;
      visibility: hidden;
      opacity: 0;
    }

    .item:hover>.second {
      display: block;
    }

    .first {
      cursor: pointer;
    }

    .second {
      display: none;
    }
  </style>
</head>

<body>
  <div id="main">
    <!-- <div id="div1">div1</div>
    <div id="div2">隐藏这个div2</div>
    <div id="div3">div3</div> -->
    <div class="item">
      <div class="first">概览</div>
      <div class="second">城市概览|景区概览</div>
    </div>
  </div>
</body>

</html>